﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/Admin.Master"
    EnableEventValidation="false" CodeBehind="Resource.aspx.cs" Inherits="TimKen.Web.Admin.Resource.Resource" %>

<asp:Content ContentPlaceHolderID="ContentTitle" ID="ContentTitle" runat="server">
    <%=GetLangString("MenuResourceManage")%>
</asp:Content>
<asp:Content ContentPlaceHolderID="ContentMain" ID="ContentMain" runat="server">
    <div class="list-div">
        <asp:GridView ID="gvFileList" runat="server" AutoGenerateColumns="False" OnRowCommand="gvFileList_RowCommand"
            CssClass="grid">
            <Columns>
                <asp:BoundField DataField="FileName" />
                <asp:BoundField DataField="DescriptCN" />
                <asp:BoundField DataField="ENName" />
                <asp:BoundField DataField="DescriptEN" />
                <asp:BoundField DataField="FileSize" />
                <asp:TemplateField>
                    <ItemStyle Width="80" HorizontalAlign="Center" />
                    <HeaderTemplate>
                        <%=GetLangString("Operation")%>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:ImageButton ID="btnEdit" runat="server" ToolTip='<%#GetLangString("Edit")%>'
                            CommandName="mod" CommandArgument='<%#Eval("FileName")%>' ImageUrl="../images/icon_edit.gif" />
                        <asp:ImageButton ID="btnDelete" runat="server" ToolTip='<%#GetLangString("Delete")%>'
                            CommandName="del" CommandArgument='<%#Eval("FileName")%>' ImageUrl="../images/icon_drop.gif"
                            OnClientClick="return deleteConfirm()" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <div class="pager-div">
            <ux:AspNetPager ID="AspNetPager1" runat="server" Width="100%" ShowPageIndexBox="Always"
                HorizontalAlign="right" EnableTheming="true" AlwaysShow="true" PageIndexBoxType="DropDownList"
                OnPageChanged="AspNetPager1_PageChanged" ImagePath="/images/" NavigationButtonType="Image"
                ButtonImageNameExtension="n" CpiButtonImageNameExtension="r" PagingButtonType="Image">
            </ux:AspNetPager>
        </div>
    </div>
    <div class="main-div">
        <table width="100%">
            <tr>
                <th class="label">
                    <%=GetLangString("FileName") %>：
                </th>
                <td>
                    <asp:TextBox ID="txtFileName" runat="server" Width="95%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th class="label">
                    <%=GetLangString("DescriptionCN")%>：
                </th>
                <td>
                    <asp:TextBox ID="txtDescripCN" TextMode="MultiLine" runat="server" Width="95%" Height="50px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th class="label">
                    <%=GetLangString("ENName")%>：
                </th>
                <td>
                    <asp:TextBox ID="txtEnName" runat="server" Width="95%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th class="label">
                    <%=GetLangString("DescriptionEN")%>：
                </th>
                <td>
                    <asp:TextBox ID="txtDescripEN" TextMode="MultiLine" runat="server" Width="95%" Height="50px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th class="label">
                    URL:
                </th>
                <td>
                    <asp:FileUpload ID="Ban_Img" runat="server" />
                    <asp:TextBox ID="txt_URL" runat="server" Width="250"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <th class="label"></th>
                <td>
                    <label style="color:Red;">选择URl路径上传资源文件，如果已经上传到服务器，请在文本框中指定对应文件名称<br />
                    （如果需要有预览图片，请手动添加在upload/resource/文件夹下，并对应"资源文件名.后缀.jpg"格式图片文件）<br />
                    例如：aaa.pdf是资源文件,对应的预览图片文件为:aaa.pdf.jpg<br />
                    不提供预览图片上传功能
                    </label>
                </td>
            </tr>
            <tr>
                <th class="label">
                </th>
                <td>
                    <asp:Button ID="btnSave" runat="server" OnClick="btSave_Click" CssClass="button" />
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
